
propsage.namespace("prestige.paymentVoucher");

prestige.paymentVoucher.bulkCreate = (function($, ui){
	
	function initComponents() {
	}
	
	function initEventHandlers() 
	{ 
		$('.payment_method_type_select').on('change', onPaymentMethodTypeSelectChange);
	}
	
	function onPaymentMethodTypeSelectChange(e) {
		var val = $(this).val();
		var $row = $(this).closest('tr');
		
		console.log($row);
		console.log(val);
		
		if (val == 'Other') {
			$row.find('.payment_method_type_other').show();
		} else {
			$row.find('.payment_method_type_other').hide();
		}
	}
	
	
	$(document).ready(function(){
		initComponents();
		initEventHandlers();
	});
    
}(jQuery, propsage.ui));